1. Field of the Invention
The present invention in general relates to a device and a method for quantization and inverse-quantization in image processing and in particular relates to improved scale factors in quantization and inverse-quantization for improving images in devices such as facsimile machines, copy machines, electronic still cameras and the like.
2. Description of the Prior Art
FIG. 1 shows a block diagram of a prior-art image processing device which encodes and decodes moving picture data. In order to encode moving picture data, an input device generates moving picture signals in a Y, Cb or Cr format. A preprocessor 2 transforms these moving picture signals into a compatible format for an encoder 3. The encoder 3 reduces the amount of data to generate a bit stream without degrading the quality of the original moving picture data. A storage unit 4, such as a CD (Compact Disc), a DAT (Digital Audio Tape), or a hard-disc, stores the bit stream generated by the encoder 3.
Still referring to FIG. 1, in order to reproduce an image from the stored compressed bit stream, a decoder 5 first reads the stored moving bit stream from the storage unit 4 to generate reproduced image data. To reformat the reproduced image data to a compatible format to an output device 7, a postprocessor 6 performs a transformation process on the reproduced image data. The transformation process includes line interpolation, pixel interpolation, rate conversion, frame field conversion and aspect ratio conversion. The output device 7 displays a moving picture signal reproduced by the post-processor 6.
In recent years, a MPEG (Moving Picture Image Coding Experts Group) method has been proposed for the purposes of compressing and storing the moving picture data. In the MPEG method, a data compression method employed by the encoder 3 to generate compressed data generally includes steps of preprocessing, orthogonal transformation, quantization and entropy encoding. On the other hand, the decoder 5 performs a substantially reverse process of that performed by the encoder 3. That is, for example, entropy decoding, inverse-quantization and inverse orthogonal transformation are performed in order to decode a bit stream into an image.
FIG. 2 shows a block diagram of a quantization device to perform the above discussed quantization in the encoder 3 of FIG. 1. To perform quantization, as well known in the art, an input image is divided into a plurality of process blocks or units. Each process unit consists of, for example, an 8.times.8 group of pixels and is subject to an orthogonal transformation such as a DCT (Discrete Cosine Transform). During the transformation, a set of transform coefficients denoted by C.sub.i, .sub.j is necessary for each process unit.
The quantization device shown in FIG. 2 comprises a quantization table memory 303, a multiplying and clipping processing unit 301, and a quantization operation unit 302. The quantization table memory 303 is a semiconductor memory which stores quantization matrix information (sometimes referred to as a quantization table) used in a quantization process.
The multiplying and clipping processing unit 301 receives specified quantization matrix information Q.sub.i, .sub.j from the quantization table memory 303 and multiplies a scale factor SF by Q.sub.i, .sub.j. The multiplying and clipping processing unit 301 further clips the above resulted product using a pair of predetermined upper and lower boundaries to generate quantization basis information QSF.sub.i, .sub.j.
Finally, the quantization operation unit 302 performs a quantization operation on the transform coefficients C.sub.i, .sub.j and quantization basis information QSF.sub.i, .sub.j so as to provide quantization coefficients QC.sub.i, .sub.j. The quantization information QSF.sub.i, .sub.j is a threshold value for quantizing an analog value such as the transform coefficients C.sub.i, .sub.j.
FIG. 3 shows a block diagram of the inverse quantization device provided in the encoder 3 or the decoder 5. In order to prepare for the decoding of compressed image data, quantization table values Q.sub.i, .sub.j are provided for the multiplying and clipping processing unit 301, which multiplies a scale factor SF by the quantization table values Q.sub.i, .sub.j and then clips the product to generate QSF.sub.i, .sub.j for an inverse-quantization operation unit 502. At the same time, a decoded quantization coefficient QC.sub.i, .sub.j reproduced from the bit stream is supplied to the inverse-quantization operation unit 502 for performing an inverse-quantization process to generate transform coefficient C.sub.i, .sub.j.
When the moving picture data is subject to data compression, a process block such as 8.times.8 pixels is treated in a stream of data at equal intervals. If the image data is compressed based upon only one quantization table, it is difficult to obtain a constant compression rate for different process blocks. In other words, compression may not be executed at a constant rate. In order to obviate this problem, the MPEG method described above adjusts a scale factor for each process block while using one quantization table so as to achieve a constant image compression rate.
When an orthogonal transformation is performed on image data, the result often tends to have a concentration of power on low frequency components. In light of this tendency, a weighted quantization table which is adapted to assign a greater number of bits to higher power frequency components is employed to compress information through the quantization process. By increasing the threshold values in the quantization table, a significantly improved data compression can be achieved. However, if these threshold values are too large, it will also result in degradation of the image quality. Furthermore, since a compression rate of this quantization process depends on the nature of the data, different quantization tables must be prepared for various data. Thus, in the prior art, a plurality of quantization tables and/or a plurality of scale factors are used to solve these problems.
In the prior art, however, even when a plurality of scale factors is used, threshold values in a quantization table are multiplied by the same scale factor. This means that every part of a processing block is equally treated. That is, a trivial part containing less image information is treated the same as a crucial part containing detailed image information in the same processing block.
Prior art techniques also attempted to adjust a single scale factor to modify a compression rate. If this method is employed, however, the same scale factor which is used for high frequency components is used for low frequency components as well. Since a quantization matrix may have a different threshold value for each of the 8.times.8 pixels, a quantization step for low frequency components is different from that for high frequency components. Nonetheless, when increasing a compression rate through the adjustment of the single scale factor, low frequency components are compressed by the same proportion as high frequency components. That is, every part of a process block is treated indiscriminately. Thus, for example, although a high compression rate can be achieved with a quantization table for a low compression rate by adjusting a single scale factor, the image quality obtained is degraded more than that obtained by simply using a quantization table for a high compression rate.
Accordingly, there is a need in the field of image processing involving quantization and inverse-quantization to prevent degradation of image quality and achieve constant compression rates.